package com.example.wink_172_xg_test;


import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;

import com.tencent.android.tpush.XGPushBaseReceiver;
import com.tencent.android.tpush.XGPushClickedResult;
import com.tencent.android.tpush.XGPushManager;
import com.tencent.android.tpush.XGPushRegisterResult;
import com.tencent.android.tpush.XGPushShowedResult;
import com.tencent.android.tpush.XGPushTextMessage;


public class MessageReceiver extends XGPushBaseReceiver {

    private static final String TAG = "MessageReceiver";

    @Override
    public void onRegisterResult(Context context, int i, XGPushRegisterResult xgPushRegisterResult) {

    }

    @Override
    public void onUnregisterResult(Context context, int i) {

    }

    @Override
    public void onSetTagResult(Context context, int i, String s) {

    }

    @Override
    public void onDeleteTagResult(Context context, int i, String s) {

    }

    @Override
    public void onSetAccountResult(Context context, int i, String s) {

    }

    @Override
    public void onDeleteAccountResult(Context context, int i, String s) {

    }

    @Override
    public void onSetAttributeResult(Context context, int i, String s) {

    }

    @Override
    public void onQueryTagsResult(Context context, int i, String s, String s1) {

    }

    @Override
    public void onDeleteAttributeResult(Context context, int i, String s) {

    }

    @Override
    public void onTextMessage(Context context, XGPushTextMessage xgPushTextMessage) {

    }

    @Override
    public void onNotificationClickedResult(Context context, XGPushClickedResult xgPushClickedResult) {

    }

    @Override
    public void onNotificationShowedResult(Context context, XGPushShowedResult xgPushShowedResult) {
        Log.e(TAG, "onNotificationShowedResult: ====>>"+xgPushShowedResult.toString() );
    }

//    @Override
//    public void onReceive(Context context, Intent intent) {
//        if (intent == null) {
//            return;
//        }
//
//        String action = intent.getAction();
//        Log.e(TAG, "onReceive: ====>>"+action );
//
//        if(TextUtils.equals(action,"com.tencent.android.xg.vip.action.PUSH_MESSAGE")){
//
//        }
//
//        //        // uri --> android_secret_code://1234
////        //  host  -->  1234
////        String host = uri.getHost();
////        Log.e(TAG, "app onReceice====>>" + action + "  host:" + host);//监听键盘指令
//    }
    //命令行发送广播  请注意需要在manifest.xml中注册

}
